$(document).ready(function() {

    // 使用data参数更新数据：
    $('.datatable').datatable( {
        checkable:false,
        sortable:false,
        data: {
            cols: [
                {width: 30, text: '序号', type: 'number', flex: false, colClass: 'text-center'},
                {width: 160, text: '考核办法', type: 'date', flex: false, sort: 'down'},
                {width: 80, text: '被考核部门', type: 'string', flex: true, colClass: ''},
                {width: 80, text: '被考核职位', type: 'date', flex: false, sort: 'down'},
                {width: 80, text: '被考核人员', type: 'string', flex: true, colClass: ''},
                {width: 80, text: '考核项', type: 'date', flex: false, sort: 'down'},
                {width: 80, text: '操作', type: 'string', flex: true, colClass: ''},
            ],
            rows: [
                {checked: false, data: [1, '收费站收费员视频考核管理办法','收费站','收费员','所有收费员','<a href="#">92项</a>','<a href="#"><i class="icon icon-remove-circle"></i> 删除</a>']},
                {checked: false, data: [2, '收费站收费员视频考核管理办法','收费站','收费员','所有收费员','<a href="#">82项</a>','<a href="#"><i class="icon icon-remove-circle"></i> 删除</a>']},
                {checked: false, data: [3, '收费站收费员视频考核管理办法','收费站','收费员','所有收费员','<a href="#">82项</a>','<a href="#"><i class="icon icon-remove-circle"></i> 删除</a>']},
                {checked: false, data: [4, '收费站收费员视频考核管理办法','收费站','收费员','所有收费员','<a href="#">82项</a>','<a href="#"><i class="icon icon-remove-circle"></i> 删除</a>']},
                {checked: false, data: [5, '收费站收费员视频考核管理办法','收费站','收费员','所有收费员','<a href="#">82项</a>','<a href="#"><i class="icon icon-remove-circle"></i> 删除</a>']},
                {checked: false, data: [6, '收费站收费员视频考核管理办法','收费站','收费员','所有收费员','<a href="#">82项</a>','<a href="#"><i class="icon icon-remove-circle"></i> 删除</a>']},
                {checked: false, data: [7, '收费站收费员视频考核管理办法','收费站','收费员','所有收费员','<a href="#">82项</a>','<a href="#"><i class="icon icon-remove-circle"></i> 删除</a>']},
                {checked: false, data: [8, '收费站收费员视频考核管理办法','收费站','收费员','所有收费员','<a href="#">82项</a>','<a href="#"><i class="icon icon-remove-circle"></i> 删除</a>']},
            ]
        }
    });

    // data tree
    var myTreeData = [{
        title: '<div>坚果</div>',
    },
        {
        title: '水果',
        open: true,
        children: [
            {title: '橘子'},
            {
                title: '瓜',
                children: [
                {title: '西瓜'},
                {title: '黄瓜'}
                ]
            }
        ]
    }, {
        title: '坚果',
         open: true,
        children: [
            {title: '向日葵'},
            {title: '瓜子'}
        ]
    }, {
        title: '蔬菜',
         open: true,
    }];

    $('#myTree').tree({data: myTreeData});

});